import { Router } from 'express';
import categoryController from '../controllers/categoryController';

const router = Router();

// 商品分类管理路由
router.post('/', categoryController.createCategory);
router.get('/', categoryController.getCategoryList);
router.get('/tree', categoryController.getCategoryTree);
router.get('/stats', categoryController.getCategoryStats);
router.get('/:id', categoryController.getCategoryById);
router.put('/:id', categoryController.updateCategory);
router.delete('/:id', categoryController.deleteCategory);
router.post('/batch-delete', categoryController.deleteCategories);
router.patch('/:id/status', categoryController.updateCategoryStatus);

export default router;